﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SlgHeroStateDoBuf : NState<SlgEntityHero>
{
    public void Enter(SlgEntityHero entity, params object[] args)
    {
        entity.PlayAction(HeroFightDef.c_sAction_Win, false);
    }

    public void Execute(SlgEntityHero entity, params object[] args)
    {

    }

    public void Exit(SlgEntityHero entity, params object[] args)
    {

    }

    public bool OnMessage(SlgEntityHero entity, MessageBody message)
    {
        if(message.msgId == HeroFightDef.c_sAction_Win)
        {
            entity.ChangeState(SlgHeroState.c_sSlgHero_Idle);
        }
        return false;
    }
}
